/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : eladmin

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 27/05/2020 17:06:07
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for order_detail
-- ----------------------------
DROP TABLE IF EXISTS `order_detail`;
CREATE TABLE `order_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `master_id` bigint(20) DEFAULT NULL,
  `model` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '型号',
  `color` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '颜色',
  `size` char(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '尺码',
  `style` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '男女款',
  `quantity` tinyint(4) DEFAULT NULL COMMENT '件数',
  `unit_price` double DEFAULT NULL COMMENT '单价',
  `total_price` double DEFAULT NULL COMMENT '总价',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of order_detail
-- ----------------------------
BEGIN;
INSERT INTO `order_detail` VALUES (1, 1, '', '', '', '', 4, 25, 100);
INSERT INTO `order_detail` VALUES (2, 2, 'ATSM353-1紧身型', '蓝色', 'L', '男款', 1, 50, 50);
INSERT INTO `order_detail` VALUES (3, 2, 'ATSM353-1紧身型', '蓝色', '3XL', '男款', 1, 50, 50);
INSERT INTO `order_detail` VALUES (4, 3, 'ATSM353-1紧身型', '蓝色', 'L', '男款', 8, 40, 320);
INSERT INTO `order_detail` VALUES (5, 3, 'ATSM246-1', '粉色', 'L', '女款', 2, 40, 80);
INSERT INTO `order_detail` VALUES (6, 4, 'ATSM353-1紧身型', '蓝色', 'L', '男款', 1, 50, 50);
COMMIT;

-- ----------------------------
-- Table structure for order_master
-- ----------------------------
DROP TABLE IF EXISTS `order_master`;
CREATE TABLE `order_master` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_date` date DEFAULT NULL COMMENT '下单时间',
  `quantity` tinyint(4) DEFAULT NULL COMMENT '件数',
  `total_price` double DEFAULT NULL COMMENT '总价',
  `postage` double DEFAULT NULL COMMENT '邮费',
  `postage_direct` double DEFAULT '1' COMMENT '0:不需快递；1：寄方支付；2：收方支付',
  `express` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '物流公司',
  `express_number` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '物流单号',
  `send_off` tinyint(1) DEFAULT NULL COMMENT '是否发货',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of order_master
-- ----------------------------
BEGIN;
INSERT INTO `order_master` VALUES (1, '2020-05-02', 4, 100, 0, 0, NULL, NULL, 1, '雪山寺内部销售4件');
INSERT INTO `order_master` VALUES (2, '2020-05-21', 2, 100, 13, 1, '京东物流', 'JDX001753350001', 1, '哈尔滨买家下单购买，电话确认尺码颜色时，加购一件，微信转账。');
INSERT INTO `order_master` VALUES (3, '2020-05-24', 10, 400, 13, 1, '京东物流', 'JDX001762663352', 1, '哈尔滨买家重复购买。');
INSERT INTO `order_master` VALUES (4, '2020-05-26', 1, 50, 9, 1, '京东物流', 'JDX001772273543', 1, '临沂买家下单购买。');
COMMIT;

-- ----------------------------
-- Table structure for stock
-- ----------------------------
DROP TABLE IF EXISTS `stock`;
CREATE TABLE `stock` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `model` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '型号',
  `color` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '颜色',
  `size` char(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '尺码',
  `style` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '男女款',
  `total_quantity` tinyint(4) DEFAULT NULL COMMENT '件数',
  `sold_quantity` tinyint(4) DEFAULT NULL COMMENT '卖出的数量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of stock
-- ----------------------------
BEGIN;
INSERT INTO `stock` VALUES (1, 'ATSM353-1紧身型', '蓝色', '3XL', '男款', 14, 1);
INSERT INTO `stock` VALUES (2, 'ATSM353-1紧身型', '蓝色', '2XL', '男款', 5, NULL);
INSERT INTO `stock` VALUES (3, 'ATSM353-1紧身型', '蓝色', 'L', '男款', 27, 10);
INSERT INTO `stock` VALUES (4, 'ATSM353-1紧身型', '蓝色', 'M', '男款', 17, NULL);
INSERT INTO `stock` VALUES (5, 'ATSM353-1', '蓝色', 'S', '男款', 4, NULL);
INSERT INTO `stock` VALUES (6, 'ATSM246-1', '粉色', '3XL', '女款', 2, NULL);
INSERT INTO `stock` VALUES (7, 'ATSM246-1', '粉色', 'L', '女款', 15, 2);
INSERT INTO `stock` VALUES (8, 'ATSM246-1紧身型', '粉色', 'M', '女款', 8, NULL);
INSERT INTO `stock` VALUES (9, 'ATSM246-1', '粉色', 'S', '女款', 7, NULL);
INSERT INTO `stock` VALUES (10, '运动啦啦队服', '浅蓝色', 'L', '女款', 1, NULL);
INSERT INTO `stock` VALUES (11, '运动啦啦队服', '浅蓝色', 'M', '女款', 5, NULL);
INSERT INTO `stock` VALUES (12, '运动短裤', '粉色', 'M', '女款', 2, NULL);
INSERT INTO `stock` VALUES (13, '运动短裤', '黑色', 'L', '男款', 1, NULL);
INSERT INTO `stock` VALUES (14, '背心', '粉色', 'M', '女款', 3, NULL);
INSERT INTO `stock` VALUES (15, '运动T恤', '黄绿色', '3XL', '男款', 1, NULL);
INSERT INTO `stock` VALUES (16, 'POLO衫', '浅蓝色', 'L', '男款', 4, NULL);
INSERT INTO `stock` VALUES (17, 'POLO衫', '红色', 'XL', '男款', 1, NULL);
INSERT INTO `stock` VALUES (18, 'POLO衫', '白色', 'XL', '男款', 5, NULL);
INSERT INTO `stock` VALUES (19, '运动裤', '黑色', '3XL', '男款', 1, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
